﻿//自动义双击方法
function CustomDbClick() {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    var vid = record.getData("WorkFlowInsId");
    if (vid != "") {
        window.parent.$("#tabs").tabs('close', '查看交付申请单--项目');
        var pagetitle = "查看交付申请单--项目";
        parent.addTabs(pagetitle, '../Crm/Deliver/AddDeliverMajorProject.aspx?r=' + Math.random() + '&WorkflowInsId=' + vid + '&view=check&flag=1&entity=CrmDeliverMajorProject&id=' + vid + '&title=' + encodeURI(pagetitle));
        parent.NeedRefreshPage = this;
    }
}
//自定义新增方法
var fnCustomAdd = function () {   
    window.parent.$("#tabs").tabs('close', '起草项目申请单');
    var pagetitle = "起草项目申请单";
    parent.addTabs(pagetitle, '../Crm/BasePages/StartWorkflow.aspx?title=&WorktaskId=b56aae39-d005-455f-84d4-f58a5897a462&WorkflowId=40e5465a-eb40-448d-8b6a-2dc13e913745');
    parent.NeedRefreshPage = this;
}
//自定义修改方法
var fnCustomEdit = function () {
}
//自定义删除方法
//var fnCustomDeleteData = function () {
//    YAHOO.example.container.dialog3.hide();
//}

//格式化确认时间
var formatSureTime = function (elCell, oRecord, oColumn, sData) {
    if (sData == "00001-01-01") {
        elCell.innerHTML = "";
    }
}